/****************************************************************************
'queue.h' - Header file that declares the type definition for Queue Node and
			Queue. Also declares functions that manipulate the two (defined 
			elsewhere. See 'queue.c')s
		  - Programmer: Vincent Paul Fiestada
*****************************************************************************/

#pragma once
#include "cardinal.h" // This file includes libraries used by entire project
#include "binarytree.h"

typedef struct QueueNode
{
	BinaryTreeNode * Data;
	struct QueueNode * Next;
} QueueNode;

typedef struct
{
	QueueNode * Head;
	QueueNode * Tail;
} Queue;

// Function declarations; see 'stack.c' for definitions
Queue * CreateNewQueue();
void AnnihilateQueue(Queue * targetQueue);
QueueNode * Enqueue(Queue * targetQueue, BinaryTreeNode * data);
BinaryTreeNode * Dequeue(Queue * targetQueue);
void QueueUnderflow();
void PrintQueue(Queue * targetQueue);

/******************************************************************************
Include Function Definitions: (Won't get compiled otherwise since I don't know
how to control the linker)
******************************************************************************/
#include "queue.c"